package com.mediastory.spsserver.urgencyNoticeFile.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mediastory.spsserver.urgencyNoticeFile.dao.UrgencyNoticeFileDao;
import com.mediastory.spsserver.urgencyNoticeFile.domain.UrgencyNoticeFile;
import com.mediastory.spsserver.urgencyNoticeFile.service.UrgencyNoticeFileSvc;

@Service
@Transactional
public class UrgencyNoticeFileSvcImpl implements UrgencyNoticeFileSvc {

	@Autowired
	UrgencyNoticeFileDao urgencyNoticeFileDao;
	
	public UrgencyNoticeFileSvcImpl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public List<UrgencyNoticeFile> findbyList(Map<String, Object> condition)
			throws Exception {
		// TODO Auto-generated method stub
		return (List<UrgencyNoticeFile>) (urgencyNoticeFileDao.SelectList(condition));
	}

	public Map<String, Object> findbyListPaging(Map<String, Object> condition)
			throws Exception {
		// TODO Auto-generated method stub
		Map<String, Object> resultMap = new HashMap<String, Object>();
		resultMap.put("urgencyNoticeList", (List<UrgencyNoticeFile>) (urgencyNoticeFileDao.SelectList(condition)));
		resultMap.put("urgencyNoticeListTotalCnt", (Integer) (urgencyNoticeFileDao.SelectListTotalCnt(condition)));
		
		return resultMap;
	}

	@Override
	public UrgencyNoticeFile findby(Map<String, Object> condition) throws Exception {
		// TODO Auto-generated method stub
		return urgencyNoticeFileDao.select(condition);
	}

	@Override
	public UrgencyNoticeFile add(UrgencyNoticeFile urgencyNoticeFile) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public UrgencyNoticeFile modify(UrgencyNoticeFile urgencyNoticeFile) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int remove(Map<String, Object> condition) throws Exception {
		// TODO Auto-generated method stub
		return urgencyNoticeFileDao.delete(condition);
	}

}
